package com.example.demo.reflect;

import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @desc:
 * @author: fuxiang
 * @date: 2018/3/5 20:15
 */
public class TestMain {
    public static void main(String[] args) throws IllegalAccessException {
        Map<String,Object> map=new HashMap();
        map.put("name","lisi");
        map.put("age",23);

        Student student = new Student();
        Reflect.MapToBean(map,student,Student.class.getDeclaredFields());
        System.out.println(student);
       /* Banji banji=new Banji("1","一般");
        Banji banji2=new Banji("2","二般");*/
       /* List<Banji> list=new ArrayList<>();
        list.add(banji);
        list.add(banji2);
        student.setBanjis(list);*/
        String[] a={"ahjk","b","c"};
        //String substring = a.substring(-1)[0];
        Banji banji=new Banji();

    }
}
